﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;

namespace EntityFramework.Entity.Core
{
    public abstract class EntityConfigurationBase<TEntity> : EntityTypeConfiguration<TEntity>, IEntityMapper
        where TEntity : EntityBase
    {
        public EntityConfigurationBase()
        {
            this.HasKey(p => p.ID);
            this.Property(p => p.RowVersion).IsRowVersion();
        }


        public void RegistTo(System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar configurations)
        {
            configurations.Add(this);
        }
    }
}
